package cn.ycc1.dubboconsumer.controller;

import cn.ycc1.dubboapi.api.DemoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ycc
 * @date 2024/10/29
 */
@RestController
@RequiredArgsConstructor
public class HelloController {

    private final DemoService demoService;

    @GetMapping("/hello")
    public String hello() {
        String result = demoService.sayHello("hello dubbo");
        System.out.println("Receive result ======> " + result);
        return "hello~";
    }
}
